package com.code.day07.LambdaStudy;

import java.util.Arrays;
import java.util.function.Supplier;

public class DemoSupplier {
    public static void main(String[] args) {
        method(() -> {
                int []arr = {1, 2, 4, 5, 12};
                Arrays.sort(arr);
                return arr[arr.length - 1];

        });
    }
    public static void method(Supplier<Integer> supplier){
        Integer value = supplier.get();
        System.out.println("value = " + value);
    }
}

